package org.googlecode.lightning.search.search;

import java.io.IOException;
import java.util.List;

import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.queryParser.ParseException;

public interface SearchInterface {
	// 返回的结果集数量
	public static int maxNumFragmentsRequired = 10;
	public static int maxNumHits = 100;

	/**
	 * 
	 * @param queryString
	 * @param begin
	 * @param number
	 * @return
	 * @throws IOException 
	 * @throws CorruptIndexException 
	 * @throws ParseException 
	 * @throws Exception
	 */
	public abstract List<?> search(String queryString, int begin, int number) throws CorruptIndexException, IOException, ParseException;

	/**
	 * 
	 * @param queryString
	 * @return
	 * @throws ParseException 
	 * @throws IOException 
	 */
	public abstract List<?> search(String queryString) throws ParseException, IOException ;
}
